package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 
 *
 * @author code-generate
 * @date 2021-08-30
 */
@Data
@DbTable(tableName = "t_store_inout")
public class StoreInout extends BaseEntity {
        /**
     * 单据编码
     */
    @DbTableField(columnName = "c_bill_code", dbType = DbTypeEnum.VARCHAR)
    public String billCode ;

    /**
     * 单据日期
     */
    @DbTableField(columnName = "c_bill_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, timezone = "GMT+8", pattern = "yyyy-MM-dd")
    public LocalDateTime billDate ;

    /**
     * 供应商名称
     */
    @DbTableField(columnName = "c_supplier", dbType = DbTypeEnum.VARCHAR)
    public String supplier ;

    /**
     * 类别
     */
    @DbTableField(columnName = "c_type", dbType = DbTypeEnum.VARCHAR)
    public String type ;

    /**
     * 入库类别（1：入库，2：出库）
     */
    @DbTableField(columnName = "c_store_type", dbType = DbTypeEnum.INTEGER)
    public Integer storeType ;

    /**
     * 登记人Id
     */
    @DbTableField(columnName = "c_record_user_id", dbType = DbTypeEnum.INTEGER)
    public Integer recordUserId ;

    /**
     * 登记人名称
     */
    @DbTableField(columnName = "c_record_user_name", dbType = DbTypeEnum.VARCHAR)
    public String recordUserName ;

    /**
     * 登记日期
     */
    @DbTableField(columnName = "c_record_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, timezone = "GMT+8", pattern = "yyyy-MM-dd")
    public LocalDateTime recordDate ;

    /**
     * 领用人
     */
    @DbTableField(columnName = "c_claim_user", dbType = DbTypeEnum.VARCHAR)
    public String claimUser ;

    @ApiModelProperty(value = "文件")
    private List<StroeInoutFile> fileList;

    @ApiModelProperty(value = "物品详情列表")
    private List<StoreInoutDetail> storeInoutDetailList;
}
